0ead02b8ccd065a8355e1b91ae36bbdc1a15e019,src/main/java/org/datasyslab/geospark/spatialRDD/PolygonRDD.java,PolygonRDD,boundary,#,155
Before Change
Double[] boundary = new Double[4];
Double minLongtitude1=this.polygonRDD.min((PolygonXMinComparator)GeometryComparatorFactory.createComparator("polygon", "x", "min")).getEnvelopeInternal().getMinX();
Double maxLongtitude1=this.polygonRDD.max((PolygonXMinComparator)GeometryComparatorFactory.createComparator("polygon", "x", "min")).getEnvelopeInternal().getMinX();
Double minLatitude1=this.polygonRDD.min((PolygonYMinComparator)GeometryComparatorFactory.createComparator("polygon", "y", "min")).getEnvelopeInternal().getMinY();
Double maxLatitude1=this.polygonRDD.max((PolygonYMinComparator)GeometryComparatorFactory.createComparator("polygon", "y", "min")).getEnvelopeInternal().getMinY();
Double minLongtitude2=this.polygonRDD.min((PolygonXMaxComparator)GeometryComparatorFactory.createComparator("polygon", "x", "max")).getEnvelopeInternal().getMaxX();
After Change
Envelope envelopeInternal = this.rawPolygonRDD.min((PolygonXMinComparator) GeometryComparatorFactory.createComparator("polygon", "x", "min")).getEnvelopeInternal();
Double minLongtitude1 = envelopeInternal.getMinX();
Envelope envelopeInternal1 = this.rawPolygonRDD.max((PolygonXMinComparator) GeometryComparatorFactory.createComparator("polygon", "x", "min")).getEnvelopeInternal();
Double maxLongtitude1 = envelopeInternal1.getMinX();
Envelope envelopeInternal2 = this.rawPolygonRDD.min((PolygonYMinComparator) GeometryComparatorFactory.createComparator("polygon", "y", "min")).getEnvelopeInternal();
Double minLatitude1 = envelopeInternal2.getMinY();
Envelope envelopeInternal3 = this.rawPolygonRDD.max((PolygonYMinComparator) GeometryComparatorFactory.createComparator("polygon", "y", "min")).getEnvelopeInternal();
Double maxLatitude1 = envelopeInternal3.getMinY();
Envelope envelopeInternal4 = this.rawPolygonRDD.min((PolygonXMaxComparator) GeometryComparatorFactory.createComparator("polygon", "x", "max")).getEnvelopeInternal();
Double minLongtitude2 = envelopeInternal4.getMaxX();
Envelope envelopeInternal5 = this.rawPolygonRDD.max((PolygonXMaxComparator) GeometryComparatorFactory.createComparator("polygon", "x", "max")).getEnvelopeInternal();
Double maxLongtitude2 = envelopeInternal5.getMaxX();
Envelope envelopeInternal6 = this.rawPolygonRDD.min((PolygonYMaxComparator) GeometryComparatorFactory.createComparator("polygon", "y", "max")).getEnvelopeInternal();
Double minLatitude2 = envelopeInternal6.getMaxY();
Envelope envelopeInternal7 = this.rawPolygonRDD.max((PolygonYMaxComparator) GeometryComparatorFactory.createComparator("polygon", "y", "max")).getEnvelopeInternal();
Double maxLatitude2 = envelopeInternal7.getMaxY();
if (minLongtitude1 < minLongtitude2) {
minXEnvelope = envelopeInternal;
boundary[0] = minLongtitude1;
} else {
minXEnvelope = envelopeInternal1;
boundary[0] = minLongtitude2;
}
if (minLatitude1 < minLatitude2) {